# -*- coding: utf-8 -*-
"""
Created on Fri Feb 19 13:33:27 2021

@author: DELL-PC
"""
def findSmallest(arr):
    smallest=arr[0]
    smallest_index=0
    for i in range(0,len(arr)):
        if(arr[i]<smallest):
            smallest_index=i
            smallest=arr[i]
    return smallest_index
    
def sort(arr):
    new_arr=[]
    for i in range(0,len(arr)):
        #smallest=arr[findSmallest(arr)]
        smallest_index=findSmallest(arr)
        new_arr.append(arr.pop(smallest_index))
        #new_arr=new_arr.append(arr.pop(smallest))
    return new_arr

def main():
    arr=[5,3,6,2,10,1,20,200,50,60,20,80,90]
    print(sort(arr))
if __name__=="__main__":
    main()

